<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <script>
  var name = "Hello World"
  // var name = "why"
  var height = 1.88888888

  function String(str) {//先转化成一个String类型的对象
    this.str = str
    this.length = 11
    this.split = function() {

    }
  }

name = new String(name)
name.length
name.split("")//用完之后JS引擎会自动销毁掉



//在调用原始类型的属性或者方法时，内部的操作 name = new String(name)
  console.log(height.toFixed(2))
  //明明你是一个基本数据类型，你不应该有方法的，属性的
  console.log(name.length)
  console.log(name.split(""))
  var obj = {
    name:"kobe",
    running:function() {

    }
  }
  var  name1 = new String("Hellow World")
  console.log(typeof name,typeof name1)
  </script>
</body>
</html>